package com.cipe.cmrs.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.collections.FactoryUtils;
import org.apache.commons.collections.list.LazyList;

import com.cipe.cmrs.model.Projectreport;

public class ProjectReportBean implements Serializable {
	private static final long serialVersionUID = -6576066747456855456L;
	
	@SuppressWarnings("unchecked")
	private List<Projectreport> narrativeReports = LazyList.decorate(
		      new ArrayList<Projectreport>(), FactoryUtils.instantiateFactory(Projectreport.class));
	
	@SuppressWarnings("unchecked")
	private List<Projectreport> financialReports = LazyList.decorate(
		      new ArrayList<Projectreport>(), FactoryUtils.instantiateFactory(Projectreport.class));
	
	private boolean hasExistingReports;
	private Integer cipeprojectId;
	
	private boolean narrativeSectionEditable;
	private boolean financialSectionEditable;	
	
	private int narrativeReportSize = 9;
	private int financialReportSize = 9;
	
	public ProjectReportBean() { }
	
	public ProjectReportBean(Integer cipeprojectId) {
		super();
		this.cipeprojectId = cipeprojectId;
	}

	public List<Projectreport> getNarrativeReports() {
		return narrativeReports;
	}

	public void setNarrativeReports(List<Projectreport> narrativeReports) {
		this.narrativeReports = narrativeReports;
	}

	public List<Projectreport> getFinancialReports() {
		return financialReports;
	}

    public void setFinancialReports(List<Projectreport> financialReports) {
        this.financialReports = financialReports;
    }

    public boolean isHasExistingReports() {
        return hasExistingReports;
    }

    public void setHasExistingReports(boolean hasExistingReports) {
        this.hasExistingReports = hasExistingReports;
    }

    public Integer getCipeprojectId() {
		return cipeprojectId;
	}

	public void setCipeprojectId(Integer cipeprojectId) {
		this.cipeprojectId = cipeprojectId;
	}
	
	public void addNarrativeReport(Projectreport projectreport) {
		this.narrativeReports.add(projectreport);
	}
	
	public void addFinancialReport(Projectreport projectreport) {
		this.financialReports.add(projectreport);
	}

	public boolean isNarrativeSectionEditable() {
		return narrativeSectionEditable;
	}

	public void setNarrativeSectionEditable(boolean narrativeSectionEditable) {
		this.narrativeSectionEditable = narrativeSectionEditable;
	}

	public boolean isFinancialSectionEditable() {
		return financialSectionEditable;
	}

	public void setFinancialSectionEditable(boolean financialSectionEditable) {
		this.financialSectionEditable = financialSectionEditable;
	}

    public int getNarrativeReportSize() {
        return narrativeReportSize;
    }

    public void setNarrativeReportSize(int narrativeReportSize) {
        this.narrativeReportSize = narrativeReportSize;
    }

    public int getFinancialReportSize() {
        return financialReportSize;
    }

    public void setFinancialReportSize(int financialReportSize) {
        this.financialReportSize = financialReportSize;
    }

}
